<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddGoodsSkuImgTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('goods_sku', function (Blueprint $table) {
            //

            $table->string('img')->default('')->comment('商品规格图片，一张');

        });

        Schema::table('goods',function (Blueprint $table){

            $table->string('detail_img')->default('')->comment('商品详情图，多张，逗号隔开');

        });

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('goods_sku', function (Blueprint $table) {
            //

            $table->dropColumn('img');
        });

        Schema::table('goods',function (Blueprint $table){


            $table->dropColumn('detail_img');

        });

    }
}
